package leetcode100;

public class lc011 {
    public static void main(String[] args) {
    int[] nums = new int[]{1,1,2,2,3,3,4};
    int res = singleNumber(nums);
    System.out.println(res);
    }

    public static int singleNumber(int[] nums) {
        int res = 0;
        for (int num : nums) {
            res^=num;
        }
        return res;
    }
}
